<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>111111</title>
    <!--    <link rel="stylesheet" href="css/reset.css" />-->
    <!--    <link rel="stylesheet" href="css/tianindex.css" />-->
</head>
<body>
<div class="wrap" id="app">

            <button class="input_sub" @click="searchWeather">
                搜 索
            </button>
    <table width="500" border="1">
        <tr>
            <th>学生编号</th>
            <th>学生姓名</th>
            <th>学生年龄</th>
        </tr>
        <tr v-for=" s in students">
            <td>{{s.sid}}</td>
            <td>{{s.sname}}</td>
            <td>{{s.sage}}</td>
        </tr>
    </table>
</div>
<!-- 开发环境版本，包含了有帮助的命令行警告 -->
<script src="../js/vue.js"></script>
<!-- 官网提供的 axqios 在线地址 -->
<script src="../js/axios.min.js"></script>
<!-- 自己的js -->
<script>
    let app=new Vue({
        el:"#app",
        data:{
            student:"1",
            studentVo:{},
            students:[],

        },
        methods:{
            searchWeather(){
                axios.get("http://localhost:8080/student/findAll").then(result=> {

                    this.students = result.data.data.records
                  //  console.log(this.students)
                  /*  this.studentVo = this.students[0]
                    console.log(this.studentVo.sid);*/
                })
            }
        }
    })
</script>